const UserApi = require('../api/user.js');

// 查询登录用户会员服务状态
const getUserServiceState = () => {
  UserApi.getUserServiceState().then(res=>{
    if (res.retCode == '000000' && res.errCode == '000000') {
      wx.setStorageSync('userService', res.data);
    }
  })
}
const logout = () => {
  wx.removeStorageSync('token')
  wx.removeStorageSync('userInfo')
  wx.removeStorageSync('userService')
}

module.exports = {
  getUserServiceState,
  logout,
}